How to fetch same record from two table in SQL Server?
How to fetch same record from two table in SQL Server?
I completed my post-graduation in 2013 in the engineering field. Engineering is the application of science and math to solve problems. Engineers figure out how things work and find practical uses for scientific discoveries. Scientists and inventors often get the credit for innovations that advance the human condition, but it is engineers who are instrumental in making those innovations available to the world. I love pet animals such as dogs, cats, etc.
Ashutosh Kumar Verma
18-Nov-2021Fetch same Record from Two table:
The INTERSECT Operator is used to find the same record from two database in SQL Server.
Let us create two table Employees and Manager
Employees table:
Manager table:
Now, the following SQL statement is find the same record from above both table by using INTERSECT Clause,
Output: